import React from "react";
import classnames from "classnames";
import { Icon } from "antd";
import styles from "./SMSpackage.less";

function SMSpackage(props) {
  const {
    style = {},
    leftStyle = {},
    selected = false,
    leftText = "",
    rightText = "",
    onClick = () => {}
  } = props;

  return (
    <div
      className={classnames({
        [styles.root]: true,
        [styles.selected]: selected
      })}
      style={style}
      onClick={onClick}
    >
      <div className={styles.leftText} style={leftStyle}>
        {leftText}
      </div>
      <div className={styles.rightText}>{rightText}</div>
      <div className={styles.hintBg}>
        <Icon type="check" />
      </div>
    </div>
  );
}

export default SMSpackage;
